﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<UI.Web.Models.ChildActions.GameListViewModel>" %>

<h4>Current games:</h4>
<table cellspacing="0">
<thead>
<td>#</td>
<td>Opponent</td>
<td>Preset</td>

</thead>
<% foreach (var game in Model.Games) {%>
<tr>
 <td><%: Html.ActionLink(game.Id.ToString(), "Index", "Game", new { id = game.Id }, new {}) %> </td>
 <td><%: game.Creator.Login== Model.UserLogin?game.Opponent.Name:game.Creator.Name %></td>
 <td><%: game.Preset %></td>
     </tr>
<%}%>
</table>